Conventionally, in order to obtain distance information employed for robot control, etc., it has been known to use an optical distance sensor for measuring a distance from a workpiece. This kind of sensor, mounted to, e.g., a welding torch of an arc welding robot, is arranged to project a laser beam onto a workpiece through a mirror which is angularly moved to cause the laser beam to scan the workpiece, and derive a distance between the torch and the workpiece by means of a triangulation method on the basis of an angular movement position of the mirror and an incident position of the laser beam, reflected by the workpiece surface, on a light receiving section of the sensor.
During the distance measurement, a measuring error occurs, if arc light is incident upon the light receiving section. To obviate this, conventionally, a pulsative laser beam (laser pulses) is generated, and contribution of the arc light is removed on the basis of outputs of the light receiving section which are respectively generated when each laser pulse is turned on and turned off. In order to generate the laser pulses, however, a laser-beam demodulator, which is operated in synchronism with a laser-beam modulator, or the like, is required in addition to the laser-beam modulator. Further, the distance sensor of this kind is complicated in circuit arrangement, and is high in cost.
Moreover, since the light receiving section of the conventional distance sensor is composed of a semiconductor position-detection element (hereinafter referred to as PSD) consisting of semiconductor membranes of three uniformly contiguous layers, generally, the light-receiving-element output is extremely small, i.e., in the order of several tens of nA. Thus, an amplifier circuit is inevitably required. Further, this sensor is poor in measurement stability, and makes it difficult to perform steady high-speed scanning. When the strength of the laser beam is so increased as to increase the light-receiving-section output, the human body, particularly, eyes are adversely affected by the laser beam. In case that a laser beam (higher-order reflected light including secondary reflected light) reflected by the workpiece twice or more is incident upon the light receiving section, in addition to a laser beam (primary reflected light) reflected once by the workpiece, an output, which corresponds to an imaginary light receiving position of the composed incident light of the primary reflected light and the higher-order reflected light, is outputted from the conventional light receiving section composed of the PSD. As a result, a measuring error occurs.